import request from '@/sheep/request';

export default {
  // 预支付
  prepay: (data) =>
    request({
      url: 'pay/prepay',
      method: 'POST',
      data,
      custom: {
        loadingMsg: '支付中',
      },
    }),
  // 发起提现 
  withdraw: {
    list: (params) =>
      request({
        url: 'withdraw',
        method: 'GET',
        params,
        custom: {
          auth: true,
        },
      }),
    rules: () =>
      request({
        url: 'withdraw/rules',
        method: 'GET',
        custom: {
          auth: true,
        },
      }),
    apply: (data) =>
      request({
        url: 'withdraw/apply',
        method: 'POST',
        data,
        custom: {
          loadingMsg: '申请中',
          auth: true,
        },
      }),
  },
  // 快捷绑卡查询
  quickbuckleQuery: (data) =>
    request({
      url: 'pay/quickbuckleQuery',
      method: 'POST',
      data,
      custom: {
        loadingMsg: '查询中',
      },
    }),
  // 获取银行信息
  bankbinInfo: (data) =>
    request({
      url: 'pay/bankbinInfo',
      method: 'POST',
      data,
      custom: {},
    }),
  // 快捷绑卡申请
  quickbuckleApply: (data) =>
    request({
      url: 'pay/quickbuckleApply',
      method: 'POST',
      data,
      custom: {
        loadingMsg: '发送中',
      },
    }),
  // 快捷绑卡确定
  quickbuckleConfirm: (data) =>
    request({
      url: 'pay/quickbuckleConfirm',
      method: 'POST',
      data,
      custom: {
        loadingMsg: '确认中',
      },
    }),
  // 快捷支付申请
  quickpayApply: (data) =>
    request({
      url: 'pay/quickpayApply',
      method: 'POST',
      data,
      custom: {
        loadingMsg: '发送中',
      },
  }),
  // 快捷支付确认
  quickpayConfirm: (data) =>
    request({
      url: 'pay/quickpayConfirm',
      method: 'POST',
      data,
      custom: {
        loadingMsg: '支付中',
      },
  }),
  // 汇付支付宝
  huialipay: (data) =>
    request({
      url: 'pay/huialipay',
      method: 'POST',
      data,
      custom: {
        loadingMsg: '支付中',
      },
  }),
  // 解绑银行卡
  cardUnbind: (data) =>
    request({
      url: 'pay/quickbuckleunbind',
      method: 'POST',
      data,
      custom: {
        loadingMsg: '解绑中',
      },
    })
};
